package com.version.manager.controller.shop;


import com.version.manager.controller.BaseController;
import com.version.manager.entity.Shop.shopGoods;
import com.version.manager.model.Msg;
import com.version.manager.service.Shop.shopGoodsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@Api(value = "shopGoodsController")
@RequestMapping("/api/shop/shopGoods")
public class shopGoodsController extends BaseController<shopGoodsService, shopGoods> {

    @Autowired
    private shopGoodsService biz;
    @PostMapping("save")
    @ResponseBody
    public Msg save(@RequestBody shopGoods goods) throws Exception {
        return biz.save(goods);
    }

    @GetMapping("del")
    @ResponseBody
    public Msg del(HttpServletRequest request) throws Exception {
        String id=request.getParameter("id");
        return biz.del(id);
    }
}
